<?php
App::uses('AppController', 'Controller');

class InteressadosAnunciosController extends AppController {


	var $layout = 'hotsite_anuncios';
	
	public function index() {
		$this->InteressadosAnuncio->recursive = 0;
		$this->set('interessadosAnuncios', $this->paginate());
	}
	
	public function add() {
		if ($this->request->is('post')) {
			$this->InteressadosAnuncio->create();
			if ($this->InteressadosAnuncio->save($this->request->data)) {
				$this->Session->setFlash('The interessados anuncio has been saved');
				$this->redirect(array('action' => 'index'));
			} else {
				$this->Session->setFlash('The interessados anuncio could not be saved. Please, try again.');
			}
		}
	}

}
